<!--头部文件-->
<template>
  <header class="home_header">
    <div class="search">
      <div class="s_input" @click.stop="GoToSearch">
        <!--<a href="City_choice.html">大庆 <span class="iconfont icon-unfold"></span></a>-->
        <div class="search_icon" >
          <span class="iconfont icon-search"></span>
          搜索您想要的车
        </div>
      </div>
    </div>
    <!--搜索+地区选择-->
    <Banner></Banner>
    <!--焦点图-->
    <ul class="jgqj_con">
      <li v-for="item in jiagelist">
        <a href="#">{{item.jiage}}</a>
      </li>

    </ul>
    <!--价格区间选择-->
    <ul class="qichelogo_con">
      <li v-for="item in pinpai">
        <img v-bind:src=imgUrl+item.url alt="">
        <span>{{item.name}}</span>
      </li>
    </ul>
    <!--汽车logo选择-->
    <ul class="header_btn">
      <li>
        <a @click.stop="GoToBugcar">我要买车</a>
      </li>
      <li>
        <router-link to="/SellTheCar" class="m_btn">免费卖车</router-link>
      </li>
    </ul>
    <!--按钮-->
  </header>
</template>
<style>

</style>
<script>
  import Banner from '../assembly/banner.vue'
  import Router from '../router/index'
  export default{
    data(){
      return {
        msg: 'hello vue',
        jiagelist: [
          {jiage: '5万以下'},
          {jiage: '5-10万'},
          {jiage: '10-15万'},
          {jiage: '15万以上'},
          {jiage: 'SUV'},
          {jiage: '练手车'},
          {jiage: '准新车'},
          {jiage: '急售'}
        ],
        pinpai: [
          {url: 'dazhong.png', name: '大众'},
          {url: 'benteng.png', name: '奔腾'},
          {url: 'buick.png', name: '别克'},
          {url: 'chevrolet.png', name: '雪佛兰'},
          {url: 'hyundai.png', name: '现代'},
          {url: 'richan.png', name: '日产'},
          {url: 'toyota.png', name: '丰田'}
        ],
        imgUrl:'../../static/image/qichelogo/'
      }
    },
    components: {
      Banner
    },
    methods:{
      GoToBugcar:function(){
          Router.push({path:'/BuyACar'})
      },
      GoToSearch:function(){
          Router.push({path:'/Search'})
      }
    }
  }
</script>
